package com.pvdnc.dxhook;

import android.util.SparseArray;

public class OldObjectCache {
    public static final OldObjectCache INSTANCE=new OldObjectCache();

    private final SparseArray<Object> mHashCodeObjMap=new SparseArray<>();

    public void cacheOldObject(Object oldObject){
        mHashCodeObjMap.put(oldObject.hashCode(),oldObject);
    }

    public Object getOldObject(int hashCode){
        return mHashCodeObjMap.get(hashCode);
    }
}
